﻿@{
    ViewBag.Title = "会员管理";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@using JStore.Web.Controllers.HtmlHelpers
@using SpeadFrm.MvcPager
@model PagedList<JStore.Web.Controllers.Users.ViewModels.UserInfoModel>
<link href="../../Scripts/colorbox/colorbox.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="../../Scripts/colorbox/jquery.colorbox-min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $(".box").colorbox({
            iframe: true,
            width:900,
            height: 600
        });
    })
</script>
<div class="right_box_card">
    <ul>
        <li class="right_box_card1"><a href="@Url.Action("List", "Users")">会员管理</a></li>
    </ul>
</div>
@using (Html.BeginForm("List", "Users", FormMethod.Get))
{
    <table class="right_box_tab" style="margin-top: 10px;" width="100%" border="0" cellspacing="0"
        cellpadding="0">
        <tr height="30">
            <td>
                会员账号：@Html.TextBox("UserName", ViewData["UserName"], new { @class = "tab_input" })
            </td>
            <td>
                零售商：@Html.TextBox("tjUserName", ViewData["tjUserName"], new { @class = "tab_input" })
            </td>
            <td>
                批发商：@Html.TextBox("jdUserName", ViewData["jdUserName"], new { @class = "tab_input" })
            </td>
            <td>
            </td>
        </tr>
        <tr height="30">
            <td>
                会员类型：@Html.DropDownList("userTypeId", ViewData["UserTypeList"] as List<SelectListItem>)
            </td>
            <td>
                是否区代：@Html.DropDownList("isArea", ViewData["IsAreaList"] as List<SelectListItem>)
            </td>
            <td>
                区代账号：@Html.TextBox("areaUserName", ViewData["areaUserName"], new { @class = "tab_input" })
            </td>
            <td>
                <input type="submit" class="submit" value="查询" style="float: left; width: 80px;" />
            </td>
        </tr>
    </table>

}
<table class="right_box_tab" style="margin-top: 10px;" width="100%" border="0" cellspacing="0"
    cellpadding="0">
    <tr height="30" class="tab_title">
        <td>
            会员ID
        </td>
        <td>
            会员账号
        </td>
        <td>
            零售商
        </td>
        <td>
            批发商
        </td>
        <td>
            会员类型
        </td>
        <td>
            是否区代
        </td>
        <td>
            区代账号
        </td>
        <td>
            真实姓名
        </td>
        <td>
            联系电话
        </td>
        <td>
            手机号码
        </td>
        <td>
        </td>
    </tr>
    @foreach (var item in Model)
    {
        <tr height="35" class="tab_td1" style="line-height: 26px;" onmouseover="this.className = 'tab_td2' "
            onmouseout=" this.className = 'tab_td1'">
            <td>
                @item.UserId
            </td>
            <td>
                @Html.UserDetail(item.UserName)
            </td>
            <td>
                @Html.UserDetail(item.TjUserName)
            </td>
            <td>
                @Html.UserDetail(item.JdUserName)
            </td>
            <td>
                @item.UserTypeName
            </td>
            <td>
                @(item.IsArea ? "是" : "否")
            </td>
            <td>
                @Html.UserDetail(item.AreaUserName)
            </td>
            <td>
                @item.Name
            </td>
            <td>
                @item.Phone
            </td>
            <td>
                @item.Mobile
            </td>
            <td>
                @Html.ActionLink("查看零售市场", "TjTree", "Users", new { item.UserName }, new { @class = "box" })
                @Html.ActionLink("查看批发市场", "JdTree", "Users", new { item.UserName }, new { @class = "box" })
            </td>
        </tr>
    }
</table>
<div style="padding: 10px;">
    @Html.Pager(Model)
</div>
